<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>已逾期</title>
<link href="../tablecloth/tablecloth.css" rel="stylesheet" type="text/css" media="screen" />
<script type="../tablecloth/tablecloth.js"></script>
<script type="text/javascript" src="../Js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../Js/haidao.offcial.general.js"></script>
<script type="text/javascript" src="../Js/select.js"></script>
<script type="text/javascript" src="../Js/haidao.validate.js"></script>
<script src="../My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
$(function(){init();});
function init() {
	var page = parseInt(document.form1.currentPage.value);
	var pageCount = parseInt(document.form1.pageCount.value);
	var count=parseInt(document.form1.count.value);
	if (page == 1 && pageCount!=1) {
		document.form1.pre1.disabled = "disabled";
		return;
	}
	if (page == count && pageCount!=1) {
		document.form1.next1.disabled = "disabled";
		return;
	}
	if (pageCount == 1) {
		document.form1.pre1.disabled = "disabled";
		document.form1.next1.disabled = "disabled";
		document.form1.first1.disabled = "disabled";
		document.form1.end1.disabled = "disabled";
		return;
	}
} 

function first() {
	window.location.href = "<%=request.getContextPath()%>/overdueLoan/overdueLoan.do?currentPage=1" + getQueryData();
	
}

function next() {
	var page = parseInt(document.form1.currentPage.value);
	window.location.href = "<%=request.getContextPath()%>/overdueLoan/overdueLoan.do?currentPage=" + (page + 1) + getQueryData();
}

function pre() {
	var page = parseInt(document.form1.currentPage.value);
	window.location.href = "<%=request.getContextPath()%>/overdueLoan/overdueLoan.do?currentPage=" + (page - 1) + getQueryData();
}

function end() {
	var pageCount = parseInt(document.form1.pageCount.value);
	window.location.href = "<%=request.getContextPath()%>/overdueLoan/overdueLoan.do?currentPage=" + pageCount + getQueryData();
}

//拼接查询条件
function getQueryData(){
	var orderNO=$("#orderNO").val();
	var userName=$("#userName").val();
	var userNO=$("#userNO").val();
	var overdueDay1=$("#overdueDay1").val();
	var overdueDay2=$("#overdueDay2").val();
	var score1=$("#score1").val();
	var score2=$("#score2").val();
	var orderTime1=$("#orderTime1").val();
	var orderTime2=$("#orderTime2").val();
	var queryper="&orderNO="+orderNO+"&userName="+userName+"&userNO="+userNO+"&score1="+score1+"&score2="+score2
	+"&orderTime1="+orderTime1+"&orderTime2="+orderTime2+"&overdueDay1="+overdueDay1+"&overdueDay2="+overdueDay2;
	return queryper;
	}

</script>
</head>

<body>
	<div>
		<div class="view-product">
			<div class="message-manage">
				<div class="manage-record margin-lr">
				<form name="form1" method="get" action="<%=request.getContextPath()%>/overdueLoan/overdueLoan.do">
					<table border="0">
					    <tr><td>
						借款编号： <input type="text" name="orderNO" id="orderNO" size="15"  value="${orderNO}">&nbsp;&nbsp;
						名称： <input type="text" name="userName" id="userName" size="15" value="${userName}">&nbsp;&nbsp;
						用户编号： <input type="text" name="userNO" id="userNO" size="15"  value="${userNO}">&nbsp;&nbsp;
						综合评分： <input type="text" name="score1" id="score1" size="20"  value="${score1}">&nbsp;
							     至  <input type="text" name="score2" id="score2" size="20" value="${score2}">&nbsp;&nbsp;
						</td></tr><tr><td>
						创建时间： <input type="text" name="orderTime1" id="orderTime1" size="20"
						                value="${orderTime1}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">&nbsp;
							     至  <input type="text" name="orderTime2" id="orderTime2" size="20" 
							            value="${orderTime2}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">&nbsp;&nbsp;
				                逾期天数：<input type="text" name="overdueDay1" id="overdueDay1" size="20" value="${overdueDay1}">&nbsp;
				                             至  <input type="text" name="overdueDay2" id="overdueDay2" size="20" value="${overdueDay2}">&nbsp;&nbsp;
			            <input type="submit" id="addAction" value="筛选">&nbsp;&nbsp;</td>
			            </tr>
					</table>
					<div class="offcial-table margin-top clearfix">
						<div class="tr-th clearfix">
							<table width="100%" border="0">
								<thead>
									<tr>
										<th>借款编号</th>
										<th>用户编号</th>
										<th>名称</th>
										<th>借款金额</th>
										<th>日息</th>
										<th>借款期限</th>
										<th>利息</th>
										<th>服务费</th>
										<th>到账金额</th>
										<th>还款日</th>
										<th>创建时间</th>
										<th>综合评分</th>
										<th>放款时间</th>
										<th>已逾期天数</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${list}" var="u">
										<tr style="white-space: nowrap;">
											<td>${u.orderNO}</td>
											<td>${u.userNO}</td>
											<td>${u.userName}</td>
											<td>${u.money}</td>
											<td>${u.dayRates}%</td>
											<td>${u.loanTerm}</td>
											<td>${u.rateSum}</td>
											<td>${u.serviceMoney}</td>
											<td>${u.putMoney}</td>
											<td>${u.payTime}</td>
											<td>${u.orderTime}</td>
											<td>${u.score}</td>
											<td>${u.putTime}</td>
											<td>${u.overdueDay}</td>
											<td>${u.button}</td>
<!-- 											<td align="center"> -->
<%-- 											<a href="#?orderNO=${u.orderNO}">查看详情</a>&nbsp;&nbsp; --%>
<%-- 											<a href="#?orderNO=${u.orderNO}">风控报告</a> --%>
<!-- 											</td> -->
										</tr>
									</c:forEach>
								</tbody>
							</table>
							<table><tbody><tr><td>
							    <input type="hidden" name="currentPage" value="${currentPage}" /> 
								<input type="hidden" name="pageCount" value="${pageCount}"/> 
								<input type="hidden" name="count" value="${count}"/>
								<input type="button" name="first1" value="首页" onclick="first()" class="button gray" /> 
								<input type="button" name="pre1" value="上一页" onclick="pre()" class="button green"/> 
								<input type="button" name="next1" value="下一页" onclick="next()" class="button blue"/> 
								<input type="button" name="end1" value="尾页" onclick="end()" class="button gray"/> 
								<font>第${currentPage}页, 共${pageCount}页,共${count}条数据</font>
							</td></tr></tbody></table>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>

</html>